package com.powerbank.financecenter.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 财务统计实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("finance_statistics")
public class FinanceStatistics {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 统计日期
     */
    @TableField("stat_date")
    private String statDate;

    /**
     * 统计类型：DAILY-日统计，MONTHLY-月统计，YEARLY-年统计
     */
    @TableField("stat_type")
    private String statType;

    /**
     * 总交易金额
     */
    @TableField("total_transaction_amount")
    private BigDecimal totalTransactionAmount;

    /**
     * 总充值金额
     */
    @TableField("total_recharge_amount")
    private BigDecimal totalRechargeAmount;

    /**
     * 总消费金额
     */
    @TableField("total_consume_amount")
    private BigDecimal totalConsumeAmount;

    /**
     * 总退款金额
     */
    @TableField("total_refund_amount")
    private BigDecimal totalRefundAmount;

    /**
     * 总提现金额
     */
    @TableField("total_withdrawal_amount")
    private BigDecimal totalWithdrawalAmount;

    /**
     * 新增用户数
     */
    @TableField("new_user_count")
    private Integer newUserCount;

    /**
     * 活跃用户数
     */
    @TableField("active_user_count")
    private Integer activeUserCount;

    /**
     * 总交易笔数
     */
    @TableField("total_transaction_count")
    private Integer totalTransactionCount;

    /**
     * 平均交易金额
     */
    @TableField("avg_transaction_amount")
    private BigDecimal avgTransactionAmount;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;
}